<?php
/**
 * 测试表-用户模型
*/

namespace app\common\model;

use think\model\concern\SoftDelete;

class Test extends Model
{
    use SoftDelete;
    public $softDelete = true;
    protected $name = 'test';
    protected $autoWriteTimestamp = true;

    //可搜索字段
    protected $searchField = [];

    //可作为条件的字段
    protected $whereField = [];

    //可做为时间
    protected $timeField = [];

    

    

    //头像获取器
public function getAvatarAttr($value)
{
    return json_decode($value,true);
}

//头像修改器
public function setAvatarAttr($value)
{
    return json_encode($value);
}


}
